Method, apparatus, and device for determining polar code encoding and decoding

ABSTRACT

Embodiments provide a polar code encoding and decoding method in a communications system. Under the method, a basic quantized sequence can be obtained. The basic quantized sequence includes a quantized value used to represent reliability corresponding to a polarized subchannel. A target quantized sequence based on the basic quantized sequence can also be obtained. A relative magnitude relationship between elements in the target quantized sequence is nested with a relative magnitude relationship between elements in the basic quantized sequence. K largest quantized values in the target quantized sequence can be determined based on a non-fixed bit length K and polarized subchannels corresponding to the K largest quantized values can be used as a non-fixed bit position set. Polar code encoding or decoding can be performed based on the non-fixed bit position set.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2018/077852, filed on Mar. 2, 2018, which claims priority toChinese Patent Application No. 201710121684.4, filed on Mar. 2, 2017.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of channel coding anddecoding in a communications system, and more specifically, to a polarencoding or decoding method, apparatus, and device.

BACKGROUND

In a communications system, channel coding is usually used to improvedata transmission reliability and ensure communication quality. A polar(Polar) code is a coding scheme that can achieve a Shannon capacity asproved in theory and that has a simple encoding and decoding method. Thepolar code is a linear block code. A generation matrix of the polar codeis G_(N), and an encoding process of the polar code is x₁ ^(N)=u₁ ^(N),where u₁ ^(N)=(u₁, u₂, . . . , u_(N)) is a binary row vector, G_(N)=F₂^(⊗(log) ² ^((N))), a code length N=2^(n), n is a positive integer,

${F_{2} = \begin{bmatrix}1 & 0 \\1 & 1\end{bmatrix}},$F₂ ^(└(log) ² ^((N))) is a Kronecker product of F₂, and it is definedthat F₂ ^(└(log) ² ^((N)))=F└F₂ ^(└(log) ² ^((N))−1).

In the polar code encoding process, some bits in u₁ ^(N) are used tocarry information, and are referred to as information bits. A set ofsequence numbers of these information bits is denoted as A. Other bitsare set to fixed values that are pre-agreed on by a transmit end and areceive end, and are referred to as fixed bits. A set of sequencenumbers of these fixed bits is represented by a complementary set A^(c)of A. Without loss of generality, these fixed bits are usually set to 0.Actually, a fixed bit sequence can be randomly set, provided that thetransmit end and the receive end agree. Therefore, an encoded bitsequence of the polar code can be obtained by using the followingmethod: x₁ ^(N)=u_(A)G_(N)(A), where u_(A) is a set of information bitsin u₁ ^(N), and u_(A) is a row vector having a length of K, to bespecific, |A|=K, and |⋅| indicates a quantity of elements in a set, inother words, K indicates a quantity of elements in the set A, G_(N)(A)is a submatrix obtained by using rows corresponding to indexes in theset A in the matrix G_(N), and G_(N)(A) is a K×N matrix.

A key to polar code encoding is determining of the code length N and theinformation bit set A. In an existing polar code encoding solution, theinformation bit set A cannot be determined through simple calculation,and the information bit set A may further include a check bit or anotherbit that facilitates decoding. In the prior art, in most cases, anoffline computation and storage manner is adopted for determining. To bespecific, an encoder and a decoder prestore a table of correspondencesbetween a plurality of mother code sequences and code lengths and coderates. When polar code encoding is performed, a corresponding mothercode sequence is selected from the table based on a required code rateand code length.

In the prior art, to support all combinations of code lengths and coderates required by a system, a large quantity of mother code sequencesneed to be stored. Consequently, storage overheads of the system arevery high.

SUMMARY

This application provides a polar encoding method, apparatus, and deviceto reduce storage overheads of a system.

According to a first aspect, a polar code encoding and decoding methodin a communications system is provided. The method includes: obtaining abasic quantized sequence, where the basic quantized sequence includes aquantized value used to represent reliability corresponding to apolarized subchannel; obtaining a target quantized sequence based on thebasic quantized sequence, where a relative magnitude relationshipbetween elements in the target quantized sequence is nested with arelative magnitude relationship between elements in the basic quantizedsequence; determining K largest quantized values in the target quantizedsequence based on a non-fixed bit length K, and using polarizedsubchannels corresponding to the K largest quantized values, as anon-fixed bit position set; and performing polar code encoding ordecoding based on the non-fixed bit position set. According to a secondaspect, this application provides a polar encoding apparatus, configuredto perform the method according to any one of the first aspect orpossible implementations of the first aspect. Specifically, theapparatus includes units configured to perform the method according toany one of the first aspect or possible implementations of the firstaspect.

According to a second aspect, a polar code encoding and decodingapparatus in a communications system is provided. The apparatus includesa polar code structure determining module and at least one of polar codeencoding and decoding modules, where

the polar code structure determining module is configured to: obtain abasic quantized sequence, where the basic quantized sequence includes aquantized value used to represent reliability corresponding to apolarized subchannel; obtain a target quantized sequence based on thebasic quantized sequence, where a relative magnitude relationshipbetween elements in the target quantized sequence is nested with arelative magnitude relationship between elements in the basic quantizedsequence; and determine K largest quantized values in the targetquantized sequence based on a non-fixed bit length K, and use polarizedsubchannels corresponding to the K largest quantized values, as anon-fixed bit position set; the polar code encoding module is configuredto perform polar code encoding based on the non-fixed bit position setdetermined by the polar code structure determining module (201, 502);and the polar code decoding module is configured to perform polar codedecoding based on the non-fixed bit position set determined by the polarcode structure determining module.

According to a third aspect, this application provides a polar codeencoding and decoding apparatus in a communications system.Specifically, the apparatus includes a memory and a processor. Thememory is connected to the processor by using a bus system. The memoryis configured to store an instruction. The processor is configured toexecute the instruction stored in the memory, and when the instructionis executed, the processor performs the method according to any one ofthe first aspect or possible implementations of the first aspect.

According to a fourth aspect, this application provides acomputer-readable medium, configured to store a computer program. Thecomputer program includes an instruction for performing the methodaccording to any one of the first aspect or possible implementations ofthe first aspect.

In embodiments of the present invention, a system obtains a targetquantized sequence based on a basic quantized sequence of a polar code,and then obtains a non-fixed bit position set based on the targetquantized sequence, to facilitate polar code encoding or polar codedecoding. This can reduce storage overheads of the system.

DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments of thepresent invention. Apparently, the accompanying drawings in thefollowing description show merely some embodiments of the presentinvention, and a person of ordinary skill in the art may derive otheraccompanying drawings from these accompanying drawings without creativeefforts.

FIG. 1 is a flowchart of a system environment to which polar encodingand decoding are applied according to an embodiment of the presentinvention;

FIG. 1a is a schematic flowchart of a method described in FIG. 1;

FIG. 2 is a schematic diagram of a structure and an operating principleof an apparatus on an encoding side according to an embodiment of thepresent invention;

FIG. 3 is a schematic diagram of an algorithm structure of a polar codestructure determining module according to an embodiment of the presentinvention;

FIG. 3a and FIG. 3b each are a schematic diagram of an algorithmstructure of another polar code structure determining module accordingto an embodiment of the present invention;

FIG. 4 shows a specific example in an expansion rule;

FIG. 4a shows a specific example in another expansion rule;

FIG. 5 is a schematic diagram of a structure and an operating principleof an apparatus on a decoding side according to an embodiment of thepresent invention; and

FIG. 6 is a schematic structural diagram of a polar encoding deviceaccording to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly and completely describes the technical solutionsin the embodiments of the present invention with reference to theaccompanying drawings in the embodiments of the present invention.Apparently, the described embodiments are some rather than all of theembodiments of the present invention. All other embodiments obtained bya person of ordinary skill in the art based on the embodiments of thepresent invention without creative efforts shall fall within theprotection scope of the present invention.

The embodiments of the present invention may be applied to variouscommunications systems, such as a global system for mobilecommunications (Global System of Mobile Communication, GSM) system, acode division multiple access (Code Division Multiple Access, CDMA)system, a wideband code division multiple access (Wideband Code DivisionMultiple Access. WCDMA) system, a general packet radio service (GeneralPacket Radio Service, GPRS) system, a long term evolution (Long TermEvolution, LTE) system, an LTE frequency division duplex (FrequencyDivision Duplex, FDD) system, an LTE time division duplex (Time DivisionDuplex, TDD) system, a universal mobile telecommunications system(Universal Mobile Telecommunications System, UMTS), or the like. In theforegoing system, information or data encoded by a base station or aterminal in the foregoing system by using a conventional Turbo code orLDPC code may all be encoded by using a polar code in the embodiments.

The base station may be a device configured to communicate with aterminal device. For example, the base station may be a base transceiverstation (Base Transceiver Station, BTS) in the GSM or the CDMA system,or may be a NodeB (NodeB, NB) in the WCDMA system, or may be an evolvedNodeB (evolved NodeB, eNB or eNodeB) in the LTE system. Alternatively,the base station may be a relay node, an access point, an in-vehicledevice, a wearable device, a network side device in a future 5G network,or the like. The base station may be alternatively a terminal thatfunctions as a base station in device-to-device (Device-to-Device, D2D)communication.

The terminal may communicate with one or more core networks by using aradio access network (Radio Access Network, RAN). The terminal may beuser equipment (User Equipment, UE), an access terminal, a subscriberunit, a subscriber station, a mobile station, a mobile console, a remotestation, a remote terminal, a mobile device, a user terminal, a wirelesscommunications device, a user agent, a user apparatus, or the like. Theaccess terminal may be a cellular phone, a cordless phone, a sessioninitiation protocol (Session Initiation Protocol, SIP) phone, a wirelesslocal loop (Wireless Local Loop, WLL) station, a personal digitalassistant (Personal Digital Assistant, PDA), a handheld device having awireless communication function, a computing device, another processingdevice connected to a wireless modem, an in-vehicle device, a wearabledevice, a terminal device in the future 5G network, or the like.

For ease of understanding, a method 100 for polar encoding in anembodiment of the present invention is described in detail below withreference to FIG. 1 to FIG. 5.

FIG. 1 shows a processing procedure on a physical layer in a wirelesscommunications system. On a transmit end, a source signal experiencessource coding, and channel coding, or rate matching, and digitalmodulation, and is then sent to a receive end through a channel. On thereceive end, digital demodulation, rate dematching, channel decoding,and source decoding are performed on the signal received through thechannel, to obtain a destination signal.

This example implementation relates to channel coding and channeldecoding. The channel coding is used to increase redundancy and improverobustness of an information flow during channel transmission. Usually,a channel coding scheme may be a Turbo code, a polar (or referred to asPolar) code, or a low-density parity-check code (Low-densityParity-check Code, LDPC code for short). This implementation mainlyfocuses on a channel coding method using a polar code and acorresponding decoding method and apparatus that may be applied tovarious communications systems, including a communications systemcapable of supporting at least two coding and decoding schemes. Detailsare not described herein.

FIG. 1a generally shows a polar code encoding and decoding method in acommunications system.

101. Obtain a basic quantized sequence, where the basic quantizedsequence includes a quantized value used to represent reliabilitycorresponding to a polarized subchannel.

The polarized subchannel is a subchannel for polar code encoding ordecoding, and may be indicated by information such as a sequence numberor an index.

The quantized value used to represent the reliability corresponding tothe polarized subchannel may be a quantized value of the reliability ora quantized value of unreliability, provided that a relative magnitudeof the reliability corresponding to the polarized subchannel can bereflected.

102. Obtain a target quantized sequence based on the basic quantizedsequence, where a relative magnitude relationship between elements inthe target quantized sequence is nested with a relative magnituderelationship between elements in the basic quantized sequence.

The element included in the basic quantized sequence or the targetquantized sequence is the quantized value used to represent thereliability corresponding to the polarized subchannel. Specifically,quantized values can indicate a mutual magnitude relationship betweenreliability corresponding to various polarized subchannels. Precision is1 or another value.

The nesting means that a magnitude relationship between elements in abasic quantized sequence N₀ is consistent with a magnitude relationshipbetween elements of corresponding polarized subchannels in a targetquantized sequence N.

In addition, if the target quantized sequence is obtained by expandingthe basic quantized sequence, the magnitude relationship between theelements in the basic quantized sequence N₀ is further consistent with amagnitude relationship between corresponding elements in the expandedpart of the target quantized sequence. For example, in an i^(th) roundof expansion, a basic quantized sequence of a length iN₀ is expandedinto a sequence of a length 2iN₀. The nesting means that a magnituderelationship between quantized values corresponding to polarizedsubchannels with sequence numbers 1 to iN₀ is consistent with amagnitude relationship between quantized values in the basic quantizedsequence of the length iN₀; and a magnitude relationship betweenquantized values corresponding to the polarized subchannels with thesequence numbers 1 to iN₀ is consistent with a magnitude relationshipbetween quantized values corresponding to polarized subchannel sequencenumbers with sequence numbers iN₀+1 to 2iN₀.

If the target quantized sequence is obtained by extracting a part fromthe basic quantized sequence, the magnitude relationship between theelements in the target quantized sequence is consistent with a magnituderelationship between elements in the extracted part from the basicquantized sequence. For example, the basic quantized sequence is Z₁¹⁶=[1, 2, 3, 6, 4, 7, 8, 12, 5, 9, 10, 13, 11, 14, 15, 16], and theelements in the extracted part are [1, 2, 3, 6, 4, 7, 8, 12]. The targetquantized sequence is determined as Z₁ ⁸=[1, 2, 3, 5, 4, 6, 7, 8] basedon elements {1, 2, 3, 4, 5, 6, 7, 8} (having no sorting relationship)that are required to be included in the target quantized sequence and arelative magnitude relationship in [1, 2, 3, 6, 4, 7, 8, 12].

103. Determine K largest quantized values in the current to-be-encodedtarget quantized sequence based on a non-fixed bit length K. and usepolarized subchannels corresponding to the K quantized values, as anon-fixed bit position set.

A non-fixed bit is a bit sequence excluding a fixed bit during polarcode encoding and decoding, includes an information bit, and In someembodiments, may further include a bit for check, a bit for assistingdecoding, and the like. A non-fixed information position is a subchannelthat inputs or outputs non-fixed information during the polar codeencoding and decoding, and may be indicated by information such as asequence number or an index. An element in the non-fixed bit positionset is the non-fixed information position that is also referred to as apolarized subchannel.

104: Perform polar code encoding or decoding based on the non-fixed bitposition set.

When the method is applied to an encoding side, the polar code encodingbased on the non-fixed bit position set includes: performing the polarcode encoding based on a to-be-encoded non-fixed bit sequence and thenon-fixed bit position set to obtain an encoded bit. In other words, theto-be-encoded non-fixed bit sequence is used as input of the non-fixedbit position set for performing the polar code encoding, to obtain theencoded bit. A method for constructing or generating the non-fixed bitsequence is not limited in this specification.

When the method is applied to a decoding side, the performing polar codedecoding based on the non-fixed bit position set includes:

performing the polar code decoding based on a to-be-decoded bit sequenceobtained after rate matching and the non-fixed bit position set toobtain a decoded non-fixed bit sequence. A specific decoding process ormethod is not limited in this specification.

For details, refer to the following FIG. 2 and FIG. 5 and descriptionsthereof. The details are not described in this specification.

For ease of understanding, definitions of the foregoing symbols andsymbols that may be used subsequently are described as follows:

K: a non-fixed bit length. Non-fixed bits include an information bit,and In some embodiments further include a check bit, a bit for assistingdecoding, and the like.

N: a target quantized sequence, or referred to as a mother code lengthof a polar code (that is an integer power of 2).

M: a target code length (on the encoding side, M is a code length of asubsequently sent sequence, and if rate matching is required after polarencoding, M is a code length obtained after rate matching is performedon a mother code length N of a polar code: on the decoding side, M is anoriginally received code length, and a length N of a target quantizedsequence is obtained after rate dematching).

I: a non-fixed information position set (a set of polarized subchannelsthat inputs or outputs non-fixed information).

Q: a sequence of sequence numbers of subchannels obtained throughsorting in ascending order of polarization weights or reliability, whichis referred to as a sorting sequence for short.

Z: a reliability sequence obtained by quantizing reliabilitycorresponding to polarized subchannels at a precision of 1, which isreferred to as a quantized sequence for short.

W₁ ^(N): magnitudes of reliability of polarized subchannels 1 to N.

Wi: a magnitude of reliability of an i^(th) polarized subchannel.

The encoding side is used as an example below first to describe animplementation the present invention. FIG. 2 is a schematic diagram ofan operating principle of a polar code encoding method and apparatus ina communications system. The following is included.

A polar code structure determining module 201 in FIG. 2 is configuredto: generate or obtain a target quantized sequence, and determine anon-fixed bit position set I based on a non-fixed bit length K and thetarget quantized sequence. Specifically, the following is included.

S201. Obtain the target quantized sequence by expanding or extracting apart from (or perform sequential selection in) a basic quantizedsequence known to the system. Regardless of expansion or partextraction, a relative magnitude relationship between elements in thetarget quantized sequence is nested with a relative magnituderelationship between elements in the basic quantized sequence.

The foregoing polarized subchannel may be uniquely indicated by asequence number or an index or in another manner. Details are notdescribed herein.

In some embodiments, when a length N of the target quantized sequence isgreater than a length of the basic quantized sequence, the basicquantized sequence is expanded according to an expansion rule to obtainthe target quantized sequence. The nesting means that the magnituderelationship between the elements in the basic quantized sequence isconsistent with a magnitude relationship between corresponding elementsincluded in the target quantized sequence of the length N. In someembodiments, if the length of the target quantized sequence is less thanor equal to the length of the basic quantized sequence, sequentialselection is performed in the basic quantized sequence in afront-to-back or back-to-front order to obtain the target quantizedsequence.

S202. Determine the non-fixed bit position set I based on the non-fixedbit length K and the target quantized sequence. In some embodiments, Klargest quantized values are selected from the target quantized sequencebased on quantized values of reliability. Polarized subchannelscorresponding to the K selected quantized values are the non-fixed bitposition set.

In some embodiments, a threshold may be set for a quantized value ofreliability, and the non-fixed bit position set is determined inparallel based on the threshold. For example, each element in the targetquantized sequence is compared with the threshold in parallel, and thenon-fixed bit position set is determined based on a relationship withthe threshold. For example, an element satisfying that a differencebetween the element and the threshold is greater than or equal to 0 or1, or that a ratio of the element to the threshold is greater than orequal to 1, or the like belongs to the non-fixed bit position set.

On one hand, if rate matching is not required subsequently (that is,M=N), for the target quantized sequence that is quantized at a precisionof 1, when a smallest value in the target quantized sequence is 1, aposition of an element that is greater than or equal to (N−K+1) in Z₁^(N) may be selected in parallel as the non-fixed bit position set I.Alternatively, when a smallest value in the target quantized sequence is0, a position of an element that is greater than or equal to (N−K) in Z₀^(N) may be selected in parallel as the non-fixed bit position set I.

Equivalent to the foregoing example, for the target quantized sequenceof the length N, when the smallest value in the target quantizedsequence is 1, (N−K) may be used as the threshold. An element (namely, apolarized subchannel that may be indicated by a sequence number or anindex) whose difference from (N−K) is greater than 1 in the targetquantized sequence is determined as the non-fixed bit position set. Ifthe smallest value in the target quantized sequence is 0, and (N−K) isalso used as the threshold, an element whose difference from (N−K) isgreater than 0 in the target quantized sequence is used as the non-fixedbit position set.

On the other hand, when rate matching is required, for example, whenM<N, positions corresponding to K largest elements other than apuncturing position in the target quantized sequence Z₁ ^(N) areselected as the non-fixed bit position set I. In addition to excludingthe puncturing position, the non-fixed bit position set I may be furtherdetermined in parallel in a manner similar to the manner of setting athreshold. Specifically, preferably, a position with lower reliabilityis selected as the puncturing position, for example, polarizedsubchannels corresponding to (N−M) smallest elements in the targetquantized sequence are used as puncturing positions for puncturing. Inthis case, the foregoing specific solution of selecting the K largestelements from the target quantized sequence as the non-fixed bitposition set is not affected. Specifically, preferably, a position withhigher reliability is selected as the puncturing position, for example,polarized subchannels corresponding to (N−M) largest elements in thetarget quantized sequence are used as puncturing positions forpuncturing. In this case, the K largest elements other than thepuncturing position, that is, positions corresponding to elements thatare greater than or equal to a threshold M−K+1, are selected from thetarget quantized sequence as the non-fixed bit position set.

In addition, when M is greater than N, no puncturing needs to beperformed on N, and subsequent rate matching does not affect theforegoing process of determining the non-fixed bit position set. Inother words, in this case, the foregoing implementation when M=N mayalso be used: the non-fixed bit position set is determined in parallelby setting a threshold.

S203. A polar code encoding module 202 performs polar code encodingbased on a to-be-encoded non-fixed bit and the non-fixed bit positionset I to obtain an encoded bit.

S204. In some embodiments, a rate matching module performs rate matchingbased on a target code length M.

A to-be-encoded bit is used as an information bit of a polar code. Insome embodiments, a check bit or another non-fixed bit is used as inputof a polarized subchannel in the non-fixed bit position set I, a knownfixed bit (or a frozen bit) is used as input of another polarizedsubchannel, and the encoded bit is obtained according to the polar codeencoding method described above. The encoded bit is also referred to asa mother code word.

It should be noted that, the foregoing quantized value is also referredto as a quantized value or a metric, and essential content thereof isnot affected by different names. A quantized sequence is different froma sorting sequence of polarized subchannels. The sorting sequence ofpolarized subchannels includes sorting of priorities of polarizedsubchannels (that may be identified by sequence numbers) used asinformation bits in a case of a particular code length. The non-fixedbit position set I is a set of the polarized subchannels (that may beidentified by sequence numbers) used as information bits. For the set,there is no concept of priority.

In this example implementation, the basic quantized sequence is expandedto obtain the target quantized sequence, so that the non-fixed bitposition set can be simply constructed. For example, duringimplementation of a product (hardware or a combination of software andhardware), a non-fixed bit position set may be determined in parallelbased on a specified quantization threshold. By contrast, in animplementation using a sorting sequence, sequential reading is requiredand a puncturing position is skipped, to determine a position of aninformation bit. According to the solution in this implementation,system performance can be maximally improved.

Differences between the quantized sequence, the sorting sequence, andthe non-fixed bit position set I are described below by using examples.For example, an example in which N=8 is described as follows:

ordered polarized subchannels: 1, 2, 3, 4, 5, 6, 7, 8;

corresponding reliability magnitude sequence W₁ ⁸=[0, 1, 1.1892, 2.1892,1.4142, 2.4142, 2.6034, 3.6034];

corresponding quantized sequence Z₁ ⁸=[1, 2, 3, 5, 4, 6, 7, 8];

sorting sequence Q₁ ⁸ of channel sequence numbers=[1, 2, 3, 5, 4, 6, 7,8]; non-fixed bit position set I={4, 6, 7, 8}.

A sequence of reliability magnitudes of the polarized subchannels, thatis, reliability magnitudes sequentially corresponding to the polarizedsubchannels 1, 2, 3, 4, 5, 6, 7, and 8 (or 0, 1, 2, 3, 4, 5, 6, and 7),is W₁ ⁸=[0, 1, 1.1892, 2.1892, 1.4142, 2.4142, 2.6034, 3.6034].Specifically, a reliability magnitude may be obtained by using aconstruction algorithm such as density evolution, Gaussianapproximation, a Bhattacharvya parameter, or a polarization weight. Thisis not limited herein.

Values in W₁ ⁸ are quantized at the precision of 1 to obtain a quantizedsequence Z₁ ⁸=[1, 2, 3, 5, 4, 6, 7, 8]. To be specific, relativereliability magnitudes (quantized values) sequentially corresponding tothe polarized subchannels 1, 2, 3, 4, 5, 6, 7, and 8 (or 0, 1, 2, 3, 4,5, 6, and 7) are Z₁ ⁸. Certainly, quantization may be alternativelyperformed in another manner, including: performing quantization atlinear and nonlinear precision, or performing quantization in an integerand decimal manner. Details are not described herein. Z may bealternatively represented starting from 0, for example, Z₁ ⁸=[0, 1, 2,4, 3, 5, 6, 7].

The polarized subchannels corresponding to the quantized values aresorted in an ascending order of values of the elements in W₁ ⁸ to obtaina sorting sequence Q₁ ⁸=[1, 2, 3, 5, 4, 6, 7, 8]. The sorting sequenceis used to indicate sequence numbers of channels in descending order ofreliability. Q may also be represented starting from 0, to be specific,Q₁ ⁸=[0, 1, 2, 4, 3, 5, 6, 7]. Although the quantized sequence and thesorting sequence seem to be consistent in form, they represent differenttechnical meanings, and have different functions during subsequent use.

For example, a quantity K of information bits=4, the non-fixed bitposition set I={4, 6, 7, 8} is obtained based on the quantized sequence(or the sorting sequence). In this embodiment, polarized subchannelsindicated by the polarized subchannels 4, 6, 7, and 8 are selected asinput channels for the information bits.

An example in which a target quantized sequence is obtained by expandinga basic quantized sequence is used below to describe an implementationof performing polar encoding. Referring to FIG. 3, the method includes:

determining a basic quantized sequence Z₁ ^(N) ⁰ and an expansion rule(the expansion rule is indicated by an expansion rule parameter).

In some embodiments, a length of the basic quantized sequence is aninteger power of 2, and may be a minimum mother code length N₀ allowedin a communications system, or may be a length between a maximum mothercode length and a minimum mother code length. The minimum mother codelength specified in the system is, for example, 8, 16, or 32. Themaximum mother code length specified in the system is, for example, 512or 1024. For example, the length of the basic quantized sequence is 64,and certainly, may be alternatively 128 or 256, or another possiblelength. Certainly, the system may specify different maximum mother codelengths based on scenarios having different requirements. For example, amaximum code length of downlink control information is 512, and amaximum code length of uplink control information is 1024. The systemmay use different basic quantized sequences for different scenarios asrequired, or for simplification, the system may use a same basicquantized sequence. Details are not described in this specification.

The basic quantized sequence may be expanded by using the method in thisimplementation based on a case agreed on by the system, to obtain atarget quantized sequence whose code length is greater than a codelength of the basic quantized sequence. For a target quantized sequencewhose code length is less than or equal to the code length of the basicquantized sequence, the target quantized sequence may be directlyextracted from the basic quantized sequence, and may be obtained in afront-to-back or back-to-front order.

The basic quantized sequence may be determined through onlinecomputation. For example, a quantized sequence obtained in a previousround of expansion is used as a new basic quantized sequence. In someother embodiments, the basic quantized sequence may be directly obtainedby using a basic quantized sequence stored in the system, or may beobtained by converting a representation manner in another form. Arepresentation manner of the basic quantized sequence includes, but isnot limited to, a hexadecimal representation manner, a manner ofcalculation according to a PW formula, or a binary representationmanner.

An expansion parameter may be obtained in a manner such as onlinecomputation/table lookup/form conversion. For example, as shown in FIG.3, if S rounds of expansion need to be performed, expansion parametersP₁, P₂, . . . , and P_(S) and corresponding B₁, B₂, . . . , and B_(S)are obtained. Parameters for each round are subsequently described indetail.

A quantized sequence Z₁ ^(2N) ⁰ is obtained after a first round ofexpansion based on the basic quantized sequence Z₁ ^(N) ⁰ and theexpansion rule (or the expansion rule parameter). The expansion rule issubsequently described in detail.

If required, step 302 is iteratively performed, and Z₁ ^(4N) ¹ , Z₁^(8N) ¹ , . . . , and Z₁ ^(N) may be recursively obtained, where N is afinal mother code length. To be specific, a quantized sequence Z₁ ^(2N)¹ obtained after the first round of expansion is used as a basicquantized sequence in a next round of expansion, and expansion isperformed in a similar expansion manner to obtain the quantized sequenceZ₁ ^(4N) ¹ ; or further, the obtained quantized sequence Z₁ ^(4N) ¹ maybe used as a basic quantized sequence in a next round, and expansion isperformed in a similar expansion manner, and so on.

After i rounds of quantized sequence expansion, 2^(i)N₀=N=2^(└log 2(M)┐)is obtained.

304. Determine a non-fixed bit set L/a fixed bit set F based on thedetermined target quantized sequence N.

A person skilled in the art can understand that determining a non-fixedbit position set and determining a fixed bit position set achieve anequivalent effect. Content in the various implementations can all becorrespondingly replaced, and details are not described in thisspecification. For a specific process, refer to the descriptions ofS202. Details are not described herein again.

FIG. 3a shows an example of a more specific algorithm structure in theexpansion rule for the method shown in FIG. 3. It should be noted that,the various implementations of the present invention are not limited tothe algorithm structures shown in FIG. 3 and FIG. 3a . Another algorithmstructure can be used, provided that related steps can be implemented.

In some embodiments, there are a plurality of expansion rules mentionedin step 302. In general, a relative magnitude of reliabilitycorresponding to an original channel sequence number set remainsunchanged after expansion, and a relative magnitude of reliabilitycorresponding to an added channel sequence number set is consistent withthe relative magnitude of the reliability corresponding to the originalchannel sequence number set. The expansion rule may be obtained throughonline computation, or may be directly obtained by using a stored rule,or may be obtained by converting a representation manner in anotherform. Expansion rules include, but are not limited to, the following.

Expansion Rule 1:

In short, referring to FIG. 3a , expansion is performed based onparameters P_(i)=[P_(i1), P_(i2), . . . , P_(ij), . . . , P_(iS)] andB_(i)=[B_(i1), B_(i2), . . . , B_(ij), . . . , B_(iS)]. An element groupincluding P_(ij) in P_(i) and B_(ij) in B_(i) is used to indicate thatB_(ij) polarized subchannels (elements) are inserted after a subchannelwhose quantized reliability value is P_(ij) in a basic quantizedsequence in this round of expansion, where i is a natural numberstarting from 1, i represents a current round of expansion, j is anatural number ranging from 1 to S, and S is a quantity of polarizedsubchannel positions that need to be inserted in an i^(th) round ofexpansion.

In other words, during the first round of expansion, the expansion isperformed according to a rule defined by parameters P₁=[P₁₁, P₁₂, . . ., P_(1j), . . . , P_(1s)] and B₁=[B₁₁, B₁₂, . . . , B_(1j) . . . ,B_(1S)]. Each element group that includes P_(1j) and B_(1j) located at asame position in P₁ and B₁ is used to indicate that quantized values(elements in a quantized sequence) corresponding to B_(1j) polarizedsubchannels are inserted after a channel whose quantized reliabilityvalue is P_(1j) in the basic quantized sequence, where j and S arenatural numbers, and j is a natural number ranging from 1 to S.

If a next round of expansion is required, similar expansion may beperformed based on the expanded quantized sequence (used as a new basicquantized sequence) and a parameter P₂ and a corresponding parameter B₂,where the parameter P₂=[P₂₁, P₂₂, . . . , P_(2j), . . . , P_(2S)] andthe corresponding parameter B₂=[B₂₁, B₂₂, . . . , B_(2j), . . . ,B_(2S)], and each element group that includes P_(2j) and B_(2j) locatedat a same position in P₂ and B₂ is used to indicate that B_(2i) elementsare inserted after a channel whose quantized reliability value is P_(2i)in the basic quantized sequence, where S is a natural number, and i is anatural number ranging from 1 to S.

Referring to FIG. 3a, 3021a . Obtain, according to the followingformula:Z′ _(k) =Z _(k) +Bi _(j) ,Z _(k) ∈Z ₁ ² ^(i−1) ^(N) ⁰

(Calculation condition: Z_(k)>Z_(Pi) _(j)

Assign: Z_(k)==Z′_(k), an updated value of a quantized valuecorresponding to a same polarized subchannel in a currently expandedquantized sequence Z_(k) and in the basic quantized sequence.

In some embodiments, the following is included: determining an elementZ_(P1) ₁ , at a position P1₁ in Z₁ ^(N) ¹ , and updating an element thatis greater than or equal to Z_(P1) ₁ +1 in Z₁ ^(N) ¹ to Z_(i)+1+B1₁. Anelement that is less than Z_(P1) ₁ +1 is not updated. In addition. Z₁^(N) ¹ is updated for a plurality of times in a same manner until allelements in P1 or B1 are traversed, and Z′₁ ^(N) ¹ is obtained after theupdate is completed. If no element that is greater than or equal toZ_(P1) _(i) +1 exists in Z₁ ^(N) ¹ in an update process, a next round ofupdate is directly performed.

For example, FIG. 4 shows an update example of expanding Z₁ ⁸ into N₁¹⁶·Z₁ ⁸=[1, 2, 3, 5, 4, 6, 7, 8], P1=[5, 7, 8], and B1=[1, 3, 4] areinput. Output obtained after calculation is Z′₁ ⁸=[1, 2, 3, 6, 4, 7, 8,12].

Referring to FIG. 3a, 3022a and 3023a . Obtain, by using the followingformula:Z ₂ _(i−1) _(N) ₀ ₊₁ ² ^(i) ^(N) ⁰ =[1,2, . . . 2^(i) N ₀]\Z ₁ ² ^(i−1)^(N) ⁰

Z₁ ² ^(i) ^(N) ⁰ =[Z₁ ² ^(i−1) ^(N) ⁰ ,Z₂ _(i−1) _(N) ₀ ₊₁ ² ^(i) ^(N) ⁰], an expanded target quantized sequence N through a required quantityof rounds of expansion.

Specifically, the algorithm includes the following steps.

3022 a. Obtain a difference set {Z_(2N) ₁ ₊₁ ^(2N) ¹ } of the foregoingtwo element sets according to the following formula: {1, 2, . . . ,2N1}/{Z′₁ ^(N) ¹ }, where each element is merely a metric, and there isno concept of sorting.

For example, referring to FIG. 4, based on a set {1, 2, 3, 4, 5, 6, 7,8, 9, 10, 11, 12, 13, 14, 15, 16} of elements required in N₁ ¹⁶ and aset {1, 2, 3, 6, 4, 7, 8, 12} of elements in Z′₁ ⁸, a difference {Z₉¹⁶}={5, 9, 10, 11, 13, 14, 15, 16} of the two element sets is obtained.

3023 a. Sort elements in the set {_(2N) ₁ ₊₁ ^(2N) ¹ } based on relativemagnitudes and positions similar to relative magnitudes and positions ofelements in Z′₁ ^(N) ¹ , to obtain final required Z_(2N) ₁ ₊₁ ^(2N) ¹ .

As shown in FIG. 4, {Z₉ ¹⁶} is sorted based on relative magnitudes ofelements in Z′₁ ⁸=[1, 2, 3, 6, 4, 7, 8, 12], to obtain Z₉ ¹⁶=[5, 9, 10,13, 11, 14, 15, 16].

In this way, a quantized sequence, namely, Z₁ ¹⁶=[1, 2, 3, 6, 4, 7, 8,12, 5, 9, 10, 13, 11, 14, 15, 16], is obtained after the first round ofexpansion through the foregoing expansion.

The foregoing expansion method is circularly used based on a length ofthe target quantized sequence. A quantized sequence obtained after eachround of expansion is used as a basic quantized sequence for a nextround of expansion. Expansion is performed according to an expansionrule for a current round of expansion, to obtain the target quantizedsequence.

In the foregoing solution, it may be understood from a perspective of aresult that, expansion is performed according to an expansion rule for acorresponding sorting sequence Q:

P₁=[P₁₁, P₁₂, P_(1i), . . . , P_(1s)] and B₁=[B₁₁, B₁₂, . . . , B_(1i),. . . , B_(1s)] indicate that B1_(i) elements (B1_(i) elements atconsecutive positions in Q_(1N) ₁ ₊₁ ^(2N) ¹ ) are inserted between aP_(1j) ^(th) position and a P_(1(i+1)) ^(th) position in an originalsorting sequence Q₁ ^(N) ¹ .

For example, for the example in FIG. 4, an original sorting sequence Q₁⁸=[1, 2, 3, 5, 4, 6, 7, 8] is expanded based on P1=[5, 7, 8] and B1=[1,3, 4] into:

1 2 3 5 4 6 7 8

1 2 3 5 9 4 6 7 10 11 13 8 12 14 15 16.However, if the method of expansion based on a sorting sequence is used,information element positions need to be sequentially determined for afinally generated sorting sequence. In the various implementations ofthe present invention, information bit positions can be determined inparallel based on the determined target quantized sequence, therebyimproving overall performance of an encoding process.

Expansion Rule 2:

Expansion is performed based on an expansion parameter D_(i)=[D_(i1),D_(i2), . . . , D_(ik), . . . , D_(iR)], where an element D_(ik) inD_(i) is used to indicate a change relative to a quantized value on ak^(th) polarized subchannel in the basic quantized sequence, i is anatural number starting from 1, i represents a current round ofexpansion, k is a sequence number of the polarized subchannel, and Requals to a length of the basic quantized sequence during an i^(th)round of expansion.

The following is included. A first round of expansion is performed basedon an expansion parameter sequence D₁=[D₁₁, D₁₂, . . . D_(1k), . . . ,P_(1R)], where an element D_(1j) is used to indicate a change magnitude(or referred to as an increment or the like) relative to the quantizedvalue on the k^(th) polarized subchannel in the basic quantized sequenceduring the first round of expansion, i and R are natural numbers, k is anatural number ranging from 1 to R, and the length R herein is equal toa length of a current basic quantized sequence. If a next round ofexpansion is required, similar expansion may be performed based on theexpanded quantized sequence (used as a new basic quantized sequence) anda parameter D₂=[D₂₁, D₂₂, . . . D_(2k), . . . , P_(2 2R)].

Referring to FIG. 3b , the method includes the following steps.

3021 b. Update, based on the foregoing expansion parameterD_(i)=[D_(i1), D_(i2), . . . , D_(ik), . . . , D_(iR)], a quantizedvalue Z_(k) corresponding to a polarized subchannel in the current basicquantized sequence N₀. An updated value Z_(k)=Z_(k)+D_(ik), Z_(k)belongs to Z₁ ^(H), H=2^(i−1)N₀, and Z_(k)=Z_(k) is assigned.

The following is included: During the first round of expansion, elements[Z₁+D₁₁, Z₂+D₁₂, . . . , Z_(k)+D_(1k), . . . , Z_(N) ₀ +D_(1RS)] atcorresponding positions in the expanded quantized sequence are obtainedbased on the basic quantized sequence Z₁ ^(N) ⁰ during the first roundof expansion and the expansion parameter sequence D₁=[D₁₁, D₁₂, . . . ,D_(1k), . . . , D_(1R)], where R=N₀. A similar next round of expansionis performed as required.

FIG. 4a shows another update example of expanding Z₁ ⁸ into N₁ ¹⁶·Z₁⁸=[1, 2, 3, 5, 4, 6, 7, 8] and D1=[0, 0, 0, 1, 0, 1, 1, 4] are input.Output obtained after calculation is Z′₁ ⁸=[1, 2, 3, 6, 4, 7, 8, 12].

Subsequent steps 3022 b and 3023 b are the same as steps 3022 a and 3023a, and details are not described herein again.

It should be noted that, D1 indicates an increment of an element changein a unit of 1. In another implementation, the increment may beindicated directly or in a compressed or converted form or the like toreduce storage or indication complexity. A conversion example is asfollows: A hexadecimal number or an alphabet is used to indicate adecimal number, for example, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,and F indicate 1 to 15, and A, B, C, . . . , X, Y, Z indicate 1 to 26. Acompression example is as follows: A decimal system may be convertedinto a binary system, for example, 0000, 0001, 0010 may be directlyindicated by 0, 1, 10. D1=[0, 0, 0, 1, 0, 1, 1, 4] may be indicated by31, 0, 21, 4 meaning that D1 includes three 1s, 0, two 1s, and 4.

In addition, Z′₁ ⁸=[1, 2, 3, 6, 4, 7, 8, 12, 5, 9, 10, 13, 11, 14, 15,16] is obtained through one round of expansion. During a next round ofexpansion, D2 may be [0, 0, 0, 1, 0, 1, 1, 4, 0, 1, 1, 5, 2, 5, 6, 11],and output obtained after calculation is Z′₁ ¹⁶=[1, 2, 3, 7, 4, 8, 9,16, 5, 10, 11, 18, 13, 19, 21, 27].

It should be noted that, the foregoing parameters P_(i) and B_(i) orD_(i), and another expansion parameter that may be used may be known tothe system, for example, may be a table agreed on in a standard or aprotocol, are stored in a communications node or the communicationssystem, and can be obtained through invoking in a specific executionprocess. D_(i) may be alternatively obtained in an implementation ofonline computation or other form conversion. The parameters used in theimplementations of the present invention are merely examples, andanother possible parameter is not limited.

Certainly, in addition to the foregoing two expansion rules, there maybe another possible expansion rule. In general, the target quantizedsequence is obtained by expanding the basic quantized sequence by usinga recursion or nesting structure of the polar code. The variousimplementations of the present invention are not limited.

It should be noted that, the foregoing basic quantized sequence used forthe first time may be a sequence agreed on in the system, for example, abasic quantized sequence agreed on in a standard or a protocol. Severalbasic quantized sequences N₀ of different lengths are provided merely asexamples at the end of this specification, but this implementation isnot limited to an implementation in Table 1.

It should be noted that, the foregoing various basic quantized sequencesor target quantized sequences are merely used to reflect a mutualrelationship between reliability, and specific meanings thereof may bequantized values of reliability, and may be alternatively quantizedvalues of unreliability. In the foregoing examples, when a quantizedvalue of reliability (higher reliability indicates a higher quantizedvalue) is replaced by a quantized value of unreliability, the expansionrule and the like in the foregoing implementations need to be adaptivelyadjusted.

For example, in the foregoing implementations, for the obtaining,according to the following formula:Z′ _(k) =Z _(k) +Bi _(j) ,Z _(k) ∈Z ₁ ² ^(i−1) ^(N) ⁰

(Calculation condition: Z_(k)>Z_(Pi) _(j)

Assign: Z_(k)==Z′_(k), an updated value of a quantized valuecorresponding to a same polarized subchannel in a currently expandedquantized sequence Z_(k) and in the basic quantized sequence, thefollowing replacement needs to be performed: a plus sign in the formulais changed to a minus sign, and a greater-than sign is changed to aless-than sign.

In some embodiments, the following is included: determining an elementZ_(P1) ₁ at a position P1₁ in Z₁ ^(N) ¹ , and updating an element thatis less than or equal to Z_(P1) ₁ −1 in Z₁ ^(N) ¹ to Z_(i)−1−B1₁. Anelement that is greater than Z_(P1) ₁ −1 is not updated. In addition, isupdated for a plurality of times in a same manner until all elements inP1 or B1 are traversed, and Z′₁ ^(N) ¹ is obtained after the update iscompleted. If no element that is greater than or equal to Z_(P1) _(i) −1exists in Z₁ ^(N) ¹ in an update process, a next round of update isdirectly performed.

The foregoing expansion method is circularly used based on a length ofthe target quantized sequence. A quantized sequence obtained after eachround of expansion is used as a basic quantized sequence for a nextround of expansion. Expansion is performed according to an expansionrule for a current round of expansion, to obtain the target quantizedsequence.

A basic quantized sequence corresponding to a target mother code lengthN is [N−1, N−2, N−3, N−5, N−4, N−6, N−7, N−8].

FIG. 5 shows an operating principle or a processing procedure on areceive side in an implementation of the present invention. On thereceive side, a non-fixed bit position set is determined by using asimilar method. The method is applied to a polar code decoding process,and includes the following steps.

S501. In some embodiments, perform rate dematching based on a receivedto-be-processed bit sequence to obtain a to-be-decoded mother code word.

S502. Similar to step S201, a polar code structure determining module201 determines (or selects) a non-fixed bit position set I. The polarcode structure determining module 201 is configured to: generate orobtain a target quantized sequence, and determine the non-fixed bitposition set I based on a non-fixed bit length K and the targetquantized sequence. Specifically, the following is included:

S5021. Similar to step S201: obtain the target quantized sequence byexpanding or extracting a part from (or perform sequential selection in)a basic quantized sequence known to a system. An element included in thebasic quantized sequence or the target quantized sequence is used torepresent a quantized value of reliability corresponding to a polarizedsubchannel. Specifically, quantized values can indicate a mutualmagnitude relationship between reliability corresponding to variouspolarized subchannels.

The foregoing polarized subchannel may be uniquely indicated by asequence number or an index or in another manner. Details are notdescribed herein.

In some embodiments, when a length N of the target quantized sequence isgreater than a length of the basic quantized sequence, the basicquantized sequence is expanded according to an expansion rule to obtainthe target quantized sequence.

In some embodiments, if a length of the target quantized sequence isless than or equal to a length of the basic quantized sequence,sequential selection is performed in the basic quantized sequence in afront-to-back or back-to-front order to obtain the target quantizedsequence.

S5022. Similar to S202: determine the non-fixed bit position set I basedon the non-fixed bit length K and the target quantized sequence.Specifically, K quantized values are selected from the target quantizedsequence in a descending order of quantized values of reliability.Polarized subchannels corresponding to the K selected quantized valuesare the non-fixed bit position set.

S503. Perform polar code decoding based on a to-be-decoded bit obtainedafter the rate de-matching and the non-fixed bit position set I toobtain a decoded bit. Various possible decoding schemes may be used indecoding details. This is not limited in this implementation of thepresent invention.

For implementation processes of S5021 and S5022, refer to the foregoingimplementations. Details are not described again.

In some embodiments, on either the encoding side or the decoding side, anon-fixed bit position set or a fixed bit position set of the polar codecan be obtained by using the method or the operating principle and theapparatus provided in the implementations of the present invention, tobe applied to the encoding or decoding process.

A person skilled in the art may learn that, because the polar codeincludes only a non-fixed bit and a fixed bit, determination of thenon-fixed bit position set is equivalent to determining of the fixed bitposition set. The non-fixed bit may be an information bit or a check bitor even another bit that facilitates decoding. This is not limited inthe implementations of the present invention.

The method for determining a polar code structure according to theembodiments of the present invention and the application of the methodin polar encoding or decoding are described in detail above withreference to FIG. 1 to FIG. 5. FIG. 2 and FIG. 5 each further provide apolar code encoding and decoding apparatus. For an operating principleor a function of each module, refer to method procedures in FIG. 2 andFIG. 5. Details are not described herein again.

Referring to FIG. 2 or FIG. 5, a polar code encoding and decodingapparatus in a communications system includes a polar code structuredetermining module (201, 502) and a polar code encoding and decodingmodule (202, 503).

The polar code structure determining module (201, 502) is configured to:obtain a basic quantized sequence, where the basic quantized sequenceincludes a quantized value used to represent reliability correspondingto a polarized subchannel; obtain a target quantized sequence based onthe basic quantized sequence, where a relative magnitude relationshipbetween elements in the target quantized sequence is nested with arelative magnitude relationship between elements in the basic quantizedsequence; and determine K largest quantized values in the targetquantized sequence based on a non-fixed bit length K, and use polarizedsubchannels corresponding to the K largest quantized values, as anon-fixed bit position set.

The polar code encoding and decoding module (202, 503) is configured toperform polar code encoding or decoding based on the non-fixed bitposition set determined by the polar code structure determining module(201, 502).

A person skilled in the art may understand that the polar code codec maybe implemented by hardware or a combination of software and hardware. Anapparatus for determining a polar code structure and a correspondingcommunications apparatus 600 that can be configured to perform encodingand decoding according to an embodiment of the present invention aredescribed below with reference to FIG. 6.

In some embodiments, the communications apparatus 600 may be configuredas a general-purpose processing system, which, for example, is generallyreferred to as a chip. The general-purpose processing system includesone or more microprocessors providing a function of a processor, and anexternal memory providing at least a part of a storage medium 603. Theseare all connected to another supported circuit through an external busarchitecture.

In some embodiments, the communications apparatus 600 may be implementedby an ASIC (application-specific integrated circuit) including aprocessor 602, a bus interface 604, a user interface 606; and at leastone part of the storage medium 603 integrated into a single chip; or thecommunications apparatus 600 may be implemented by one or more FPGAs(field programmable gate arrays). PLDs (programmable logic devices),controllers, state machines, gate logic, discrete hardware components,or any other suitable circuits, or any combination of circuits capableof performing the various functions described throughout the presentinvention.

FIG. 6 is a schematic structural diagram of the communications apparatus600 (for example, a communications apparatus such as an access point, abase station, a station, or a terminal, or a chip in the foregoingcommunications apparatus) according to an embodiment of the presentinvention.

In an implementation, as shown in FIG. 6, the communications apparatus600 may be implemented by a bus 601 as a general bus architecture. Thebus 601 may include any quantity of interconnecting buses and bridgesbased on a specific application and an overall design constraint of thecommunications apparatus 600. The bus 601 connects various circuitstogether. These circuits include the processor 602, the storage medium603, and the bus interface 604. In some embodiments, the communicationsapparatus 600 uses the bus interface 604 to connect a network adapter605 and the like through the bus 601. The network adapter 605 may beconfigured to: implement a signal processing function on a physicallayer in a wireless communications network, and send and receive a radiofrequency signal by using an antenna 607. The user interface 606 may beconnected to a user terminal such as a keyboard, a display, a mouse, ora joystick. The bus 601 may be further connected to other circuits suchas a timing source, a peripheral, a voltage regulator, or a powermanagement circuit. These circuits are well known in the art andtherefore are not described in detail.

The processor 602 is responsible for bus management and generalprocessing (including executing software stored in the storage medium1203). The processor 602 may be implemented by one or moregeneral-purpose processors and/or dedicated processors. Examples of theprocessor include a microprocessor, a microcontroller, a DSP processor,and another circuit capable of executing the software. The softwareshould be interpreted broadly to indicate an instruction, data, or anycombination thereof, regardless of whether the software is referred toas software, firmware, middleware, microcode, a hardware descriptionlanguage, or the like.

A figure below shows that the storage medium 603 is separated from theprocessor 602. However, a person skilled in the art can easilyunderstand that the storage medium 603 or any part thereof may belocated outside the communications apparatus 600. For example, thestorage medium 603 may include a transmission line, a carrier waveformmodulated by using data, and/or a computer product separated from awireless node. All these media can be accessed by the processor 602through the bus interface 604. Alternatively, the storage medium 603 orany part thereof may be integrated into the processor 602, and may be,for example, a cache and/or a general-purpose register.

The processor 602 may perform the methods in the foregoing embodimentssuch as the embodiments shown in FIG. 1a , FIG. 2, FIG. 3, FIG. 3a , andFIG. 5, and corresponding implementations. An execution process of theprocessor 602 is not described in detail herein again.

The communications apparatus described in the embodiments of thisapplication may be a wireless communications device such as an accesspoint, a station, a base station, or a user terminal.

The polar code described in the embodiments of this applicationincludes, but not limited to, an Arikan polar code, and may bealternatively a CA-polar code or a PC-polar code. The Arikan polar is anoriginal polar code concatenated with no other codes, and includes onlyan information bit and a frozen bit. The CA-polar code is a polar codeconcatenated with cyclic redundancy check (Cyclic Redundancy Check, CRCfor short), and the PC-polar code is a polar code concatenated withparity check (Parity Check, PC for short). The PC-polar and the CA-polarare concatenated with different codes to improve polar code performance.

The “information bit sequence” described in the embodiments of thisapplication may also be referred to as a “to-be-encoded bit sequence” oran “information bit set”. Correspondingly, a “quantity of informationbits” may be a quantity of to-be-encoded bits in the to-be-encoded bitsequence, or a quantity of elements in the information bit set.

In the examples described in the embodiments herein, units and methodprocesses may be implemented by electronic hardware or a combination ofcomputer software and electronic hardware. Whether the functions areperformed by hardware or software depends on particular applications anddesign constraint conditions of the technical solutions. A personskilled in the art can implement the described functions by usingdifferent methods for each specific application.

In the several embodiments provided in this application, it should beunderstood that the disclosed apparatus and method may be implemented inother manners. For example, the described apparatus embodiments aremerely examples. For example, the unit division is merely logicalfunction division and may be other division in actual implementation.For example, a plurality of units or components may be combined orintegrated into another system, or some steps may be ignored or notperformed. In addition, coupling, direct coupling, or a communicationconnection between the units may be implemented by using someinterfaces, and these interfaces may be in an electronic form, amechanical form, or another form.

The units described as separate parts may or may not be physicallyseparate, and may be located in one position or may be distributed on aplurality of network units.

In addition, functional units in the embodiments of this application maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units are integrated into one unit.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, the embodiments may be implementedcompletely or partially in a form of a computer program product. Thecomputer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on thecomputer, the procedure or functions according to the embodiments of thepresent invention are all or partially generated. The computer may be ageneral-purpose computer, a dedicated computer, a computer network, orother programmable apparatuses. The computer instructions may be storedin a computer-readable storage medium or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line (DSL)) or wireless (forexample, infrared, radio, and microwave, or the like) manner. Thecomputer-readable storage medium may be any usable medium accessible bya computer, or a data storage device, such as a server or a data center,integrating one or more usable media. The usable medium may be amagnetic medium (for example, a floppy disk, a hard disk, or a magnetictape), an optical medium (for example, a DVD), a semiconductor medium(for example, a solid state disk Solid State Disk (SSD)), or the like.

APPENDIX

TABLE 1 N₀ = 8 Z₁ ^(N) ⁰ = [1, 2, 3, 5, 4, 6, 7, 8] N₀ = 16 Z₁ ^(N) ⁰ =[1, 2, 3, 6, 4, 7, 8, 12, 5, 9, 10, 13, 11, 14, 15, 16] N₀ = 32 Z₁ ^(N)⁰ = [1, 2, 3, 7, 4, 8, 9, 16, 5, 10, 11, 18, 13, 19, 21, 27, 6, 12, 14,20, 15, 22, 23, 28, 17, 24, 25, 29, 26, 30, 31, 32] N₀ = 64 Z₁ ^(N) ⁰ =[1, 2, 3, 7, 4, 9, 10, 19, 5, 11, 12, 22, 14, 24, 26, 38, 6, 13, 15, 25,17, 28, 30, 42, 20, 31, 33, 44, 36, 47, 49, 57, 8, 16, 18, 29, 21, 32,34, 45, 23, 35, 37, 48, 40, 50, 52, 59, 27, 39, 41, 51, 43, 53, 54, 60,46, 55, 56, 61, 58, 62, 63, 64] N₀ = 128 Z₁ ^(N) ⁰ = [1, 2, 3, 7, 4, 9,10, 20, 5, 11, 13, 24, 15, 27, 30, 47, 6, 14, 16, 28, 18, 32, 35, 53,21, 36, 39, 57, 43, 62, 66, 85, 8, 17, 19, 34, 22, 37, 40, 59, 26, 42,46, 65, 50, 69, 73, 91, 31, 48, 52, 71, 55, 75, 78, 96, 61, 80, 84, 100,88, 104, 106, 117, 12, 23, 25, 41, 29, 45, 49, 68, 33, 51, 54, 74, 58,77, 81, 98, 38, 56, 60, 79, 64, 83, 87, 103, 70, 89, 92, 107, 95, 110,112, 121, 44, 63, 67, 86, 72, 90, 93, 108, 76, 94, 97, 111, 101 113,115, 123, 82, 99, 102, 114, 105, 116, 118, 124, 109, 119, 120, 125, 122,126, 127, 128]

What is claimed is:
 1. A polar code encoding and decoding method in acommunications system, comprising: obtaining a basic quantized sequence,wherein the basic quantized sequence comprises a quantized valuerepresenting a reliability corresponding to a polarized subchannel;obtaining a target quantized sequence based on the basic quantizedsequence, wherein a relative magnitude relationship between elements inthe target quantized sequence is nested with a relative magnituderelationship between elements in the basic quantized sequence;determining K largest quantized values in the target quantized sequencebased on a non-fixed bit sequence length K, and using polarizedsubchannels corresponding to the K largest quantized values, as anon-fixed bit position set; and performing polar code encoding ordecoding based on the non-fixed bit position set.
 2. The methodaccording to claim 1, wherein the method is applied to an encoding side,and performing the polar code encoding based on the non-fixed bitposition set comprises: performing the polar code encoding based on ato-be-encoded non-fixed bit sequence and the non-fixed bit position setto obtain an encoded bit.
 3. The method according to claim 1, whereinthe method is applied to a decoding side, and performing the polar codedecoding based on the non-fixed bit position set comprises: performingthe polar code decoding based on a to-be-decoded bit sequence and thenon-fixed bit position set to obtain a decoded non-fixed bit sequence.4. The method according to claim 1, wherein obtaining the targetquantized sequence based on the basic quantized sequence comprises: if alength N of the target quantized sequence is greater than a length ofthe basic quantized sequence, expanding the basic quantized sequenceaccording to an expansion rule to obtain the target quantized sequence.5. The method according to claim 1, wherein obtaining the targetquantized sequence based on the basic quantized sequence comprises: if alength of the target quantized sequence is less than or equal to alength of the basic quantized sequence, performing sequential selectionin the basic quantized sequence in a front-to-back or back-to-frontorder to obtain the target quantized sequence.
 6. The method accordingto claim 4, wherein expanding the basic quantized sequence according toan expansion rule to obtain the target quantized sequence comprises:performing expansion based on parameters P_(i)=[P_(i1), P_(i2), . . . ,P_(ij), . . . , P_(iS)] and B_(i)=[B_(i1), B_(i2), . . . , B_(ij), . . ., B_(iS)] to obtain the target quantized sequence, wherein elementgroups P_(ij) and B_(ij) in P_(i) and B_(i) indicate that quantizedvalues corresponding to B_(ij) polarized subchannels are inserted aftera subchannel whose quantized reliability value is P_(ij) in a basicquantized sequence in this round of expansion, i is a natural numberstarting from 1, i represents a current round of expansion, j is anatural number ranging from 1 to S, and S is a quantity of polarizedsubchannel positions to be inserted in an i^(th) round of expansion. 7.The method according to claim 2, wherein expanding the basic quantizedsequence according to an expansion rule to obtain the target quantizedsequence comprises: performing expansion based on an expansion parameterD_(i)=[D_(i1), D_(i2), . . . , D_(ik), . . . , D_(iR)], wherein anelement D_(ik) in D_(i) is used to indicate a change relative to aquantized value on a k^(th) polarized subchannel in the basic quantizedsequence, i is a natural number starting from 1, i represents a currentround of expansion, k is a sequence number of the polarized subchannel,and R equals to a length of the basic quantized sequence during ani^(th) round of expansion.
 8. The method according to claim 1, whereindetermining the K largest quantized values in the target quantizedsequence based on a non-fixed bit length K comprises: determining the Klargest quantized values in the target quantized sequence in parallelbased on a threshold and the non-fixed bit length K, wherein whenpuncturing is required, the K largest quantized values are K largestquantized values other than a puncturing position.
 9. A polar codeencoding and decoding apparatus in a communications system, comprising apolar code structure determining module and a polar code encoding anddecoding module, wherein the polar code structure determining module isconfigured to: obtain a basic quantized sequence, wherein the basicquantized sequence comprises a quantized value used to representreliability corresponding to a polarized subchannel; obtain a targetquantized sequence based on the basic quantized sequence, wherein arelative magnitude relationship between elements in the target quantizedsequence is nested with a relative magnitude relationship betweenelements in the basic quantized sequence; and determine K largestquantized values in the target quantized sequence based on a non-fixedbit length K, and use polarized subchannels corresponding to the Klargest quantized values, as a non-fixed bit position set; and the polarcode encoding and decoding module is configured to perform polar codeencoding or decoding based on the non-fixed bit position set determinedby the polar code structure determining module.
 10. The apparatusaccording to claim 9, wherein the polar code encoding module isconfigured to perform the polar code encoding based on a to-be-encodednon-fixed bit sequence and the non-fixed bit position set to obtain anencoded bit.
 11. The apparatus according to claim 9, wherein the polarcode decoding module is configured to perform the polar code decodingbased on a to-be-decoded bit sequence and the non-fixed bit position setto obtain a decoded non-fixed bit sequence.
 12. The apparatus accordingto claim 9, wherein a submodule for obtaining the target quantizedsequence based on the basic quantized sequence in the polar codestructure determining module is configured to: if a length N of thetarget quantized sequence is greater than a length of the basicquantized sequence, expand the basic quantized sequence according to anexpansion rule to obtain the target quantized sequence.
 13. Theapparatus according to claim 9, wherein a submodule for obtaining thetarget quantized sequence based on the basic quantized sequence in thepolar code structure determining module is configured to: if a length ofthe target quantized sequence is less than or equal to a length of thebasic quantized sequence, perform sequential selection in the basicquantized sequence in a front-to-back or back-to-front order to obtainthe target quantized sequence.
 14. The apparatus according to claim 12,wherein the submodule for obtaining the target quantized sequence basedon the basic quantized sequence in the polar code structure determiningmodule is configured to: perform expansion based on parametersP_(i)=[P_(i1), P_(i2), . . . , P_(ij), . . . , P_(iS)] andB_(i)=[B_(i1), B_(i2), . . . , B_(ij), . . . , B_(iS)] to obtain thetarget quantized sequence, wherein element groups P_(ij) and B_(ij) inP_(i) and B_(i) indicate that quantized values corresponding to B_(ij)polarized subchannels are inserted after a subchannel whose quantizedreliability value is P_(ij) in a basic quantized sequence in this roundof expansion, i is a natural number starting from 1, i represents acurrent round of expansion, j is a natural number ranging from 1 to S,and S is a quantity of polarized subchannel positions to be inserted inan i^(th) round of expansion.
 15. The apparatus according to claim 12,wherein the submodule for obtaining the target quantized sequence basedon the basic quantized sequence in the polar code structure determiningmodule is configured to: perform expansion based on an expansionparameter D_(i)=[D_(i1), D_(i2), . . . , D_(ik), . . . , D_(iR)],wherein an element D_(ik) in D_(i) indicates a change relative to aquantized value on a k^(th) polarized subchannel in the basic quantizedsequence, i is a natural number starting from 1, i represents a currentround of expansion, k is a sequence number of the polarized subchannel,and R equals to a length of the basic quantized sequence during ani^(th) round of expansion.
 16. The apparatus according to claim 9,wherein a submodule for determining the K largest quantized values inthe polar code structure determining module comprises: determining the Klargest quantized values in the target quantized sequence in parallelbased on a threshold and the non-fixed bit length K, wherein whenpuncturing is required, the K largest quantized values are K largestquantized values other than a puncturing position.